package model

import "time"

type Code struct {
	Id uint64 `json:"id" gorm:"auto_increment" form:"id"`
	Type string `json:"type" form:"type"`
	Code string `json:"code" form:"code"`
	UserId uint64 `json:"user_id" form:"user_id"`
	Title string `json:"title" form:"title"`
	Username string `json:"username" form:"username"`
	FinalStatus int `json:"final_status" form:"final_status"`
	CreateTime time.Time `json:"create_time" form:"create_time"`
	AuthorId uint64 `json:"author_id" form:"author_id"`
	QuestionId uint64 `json:"question_id" form:"question_id"`
}

var CodeColumn = []string{
	"id",
	"type",
	"code",
	"user_id",
	"title",
	"username",
	"final_status",
	"create_time",
	"author_id",
	"question_id",
}

func (Code) TableName() string{
	return "gr_code"
}
